package main

import "fmt"

type Base struct {
	a	int
	b	int
}

type Ext struct {
	Base
	c	int
	d	int
}

func NewExt(a int, b int, c int, d int) (*Ext) {
	return &Ext{Base{a, b}, c, d}
}

func (p * Base) pa () int {
	return p.a
}

func (p * Base) pb () int {
	return p.b
}

func (p * Ext) pc () int {
	return p.c
}

func (p * Ext) pd () int {
	return p.d
}

func f() {
	var ext Ext
	fmt.Printf("a:%d, b:%d, c:%d, d:%d\n", ext.pa(), ext.pb(), ext.pc(), ext.pd())
}


func main() {
	fmt.Println("Hello, world!");
	fmt.Println("你好，世界！");
	f();

	fmt.Println("-->", new(Ext))
}

